Run unittest only when there is a code change - #1208
Merged
Conversation
The unittest workflow is very expensive. Try to limit the triggers. Only run the workflow when there is a change in Python code or in relevant configuration file.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request modifies the unittest workflow to run only when relevant files are changed, switching from a paths-ignore approach to an explicit paths approach. The goal is to reduce expensive unittest workflow runs by being more selective about which file changes trigger the workflow.
Changes:
- Replaced
paths-ignorewith explicitpathsfilters for bothpushandpull_requesttriggers - Added specific file and directory patterns that should trigger unit tests
- Included configuration files related to build and testing setup
Comments suppressed due to low confidence (1)
.github/workflows/unittest.yml:37
- Neither
setup.cfgnorsetup.pyexist in the repository. The project usespyproject.tomlwith setuptools backend for configuration (lines 5-7 of pyproject.toml showbuild-backend = \"setuptools.build_meta\"). These non-existent files should be removed from the trigger paths.
- "setup.cfg"
- "setup.py"
|
wannaphong
approved these changes
Jan 16, 2026
wannaphong
left a comment
Member
There was a problem hiding this comment.
Thank you! This patch will help us for saving free credit github action.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The unittest workflow is very expensive.
Try to limit the triggers.
Only run the workflow when there is a change in Python code or in relevant configuration file.